<% %>
<div class="page_head">
<%if @project%>
<h2><%="People on this project".t%></h2>
<%else%>
<h2><%="People on your compnay/organization".t%></h2>
<%end%>
</div>
<%=image_tag "add_icon_big.gif"%><b><%=link_to "Add a company".t,"#",:onclick=>"Effect.BlindDown('new_company',{duration:0.2});"%></b>
<div id="new_company" style="display:none">
 <%form_for :child_company,:url=>{:action=>'create_child_company'} do |t|%>
   <%=t.text_field :name,:class=>'big_font',:size=>40%>
   <%=t.hidden_field :parent_id,:value=>@cur_user.company.id%>
   <%=hidden_field_tag :project_id,:value=>@project%>
   <%=submit_tag"Create Company".t%>
 <%end%>
</div>
<%@cur_user.company.children.each do |c|%>
<div class='Company'>
<%=c.name%>
</div>
<%end%>
<div class='Company'>
 <%if @project%>
   <%=@cur_user.company.name%> -  <%=@project.name%> [<%="Users".t%>:<%=@project.users.size%>]
 <%else%>
   <%=@cur_user.company.name%>[<%="Users".t%>:<%=@cur_user.company.users.size%>]
 <%end%>
</div>
<div id="new_user" style="display:<%=(params[:act]=="new"? "on":"none")%>">
<%=render :partial =>'new_user' %>
</div>
<div id='user_list'>
<%=render :partial=>'user_list',:locals=>{:project_id=>params[:project_id]}%>
</div>
